
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@textlint/module-interop
Advanced tools
ECMAScript module interop library.
import .default
from ES module or CommonJS module.
example.mjs
const value = 42;
export default value;
import {moduleInterop} from "@textlint/module-interop";
// Doesn't matter if `require` uses `module.exports` or ES Module `export`
const value = moduleInterop(require("./example"));
console.log(value); // 42
Notes: This library is for common use. This library is not depended on textlint.
Some rule modules use export default
.
If you creating rule preset for textlint, you should wrap the required result.
const rule = require("textlint-rule-es-export-default-example");
console.log(rule); // { default: ruleImplementation }
This library resolve this issue by moduleInterop
function.
const {moduleInterop} = require("@textlint/module-interop");
const rule = moduleInterop(require("textlint-rule-es-export-default-example"));
console.log(rule); // ruleImplementation
Install with npm:
npm install @textlint/module-interop
const {moduleInterop} = require("@textlint/module-interop");
const rule = moduleInterop(require("textlint-rule-example")); // rule implementation
require
that prevent static analyzer like Asset Relocator Loader for Webpack.See Releases page.
Install devDependencies and Run npm test
:
npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
ECMAScript module interop library
The npm package @textlint/module-interop receives a total of 88,537 weekly downloads. As such, @textlint/module-interop popularity was classified as popular.
We found that @textlint/module-interop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.